/*
 * @(#)BannerAction.java $version 2012-8-13
 * 
 * Copyright 2012 NADOSTAR Gruop. All rights Reserved.
 * NADOSTAR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nadostar.iims.service.action;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.nadostar.extensions.pagination.PaginationInfo;
import com.nadostar.iims.service.bo.BannerBO;

/**
 * The Class BannerAction.
 * 
 * @author Lixing
 *
 */
@Controller
@RequestMapping("/service/banner")
public class BannerAction {
	private static Log log = LogFactory.getLog(BannerAction.class);
	
	private static PaginationInfo paginate = null;
	
	@Autowired
	private BannerBO bannerBO = null;
	
	@ModelAttribute
	public void modelPaginateAttr(HttpServletRequest request) {
		if(paginate == null) {
			paginate = new PaginationInfo("default", request, 0);
		}
	}
	
	@RequestMapping(method = RequestMethod.GET)
	public String execute() {
		return "service/bannerList";
	}
	
	@RequestMapping(value = "/search", method = RequestMethod.GET)
	public @ResponseBody Map<String, Object> search(
			@RequestParam("page") int page,
			@RequestParam("bnnrThmSeq") int bnnrThmSeq,
			@RequestParam("progress") String progress) {
		Map<String, Object> jsonMap = new HashMap<String, Object>();
		
		return jsonMap;
	}
}
